dim doc
set doc = Application.ActiveDocument
dim xMin,yMin,xMax, yMax

dim ws : set ws = CreateObject("WScript.Shell")
dim varName,regPath
varName = "View_minX"
regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName
xMin = ws.RegRead(regPath)
varName = "View_minY"
regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName
yMin = ws.RegRead(regPath)
varName = "View_maxX"
regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName
xMax = ws.RegRead(regPath)
varName = "View_maxY"
regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName
yMax = ws.RegRead(regPath)
set ws = nothing

xMin = cdbl(xMin)
yMin = cdbl(yMin)
xMax = cdbl(xMax)
yMax = cdbl(yMax)
doc.ActiveView.SetExtents xMin, yMin, xMax, yMax
